import requests


def token():
    main_url = "http://admin-api2.yhuat8.com"
    login_url = main_url + "/admin/login"
    login_data = {
        "username": "ceshizm06",
        "password": "111111",
        "code": "1240",
        "token": "4023ae064a2b129f19635be95ecaa4da",
    }
    login_headers = {
        "Content-Type": "application/json",
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36"
    }
    login_response = requests.post(
        url=login_url, json=login_data, headers=login_headers
    )
    token = login_response.json().get("data").get("token")
    return token


